<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">

	<title>NBMJSONRPCClient Class Reference</title>

	<link rel="stylesheet" href="../css/style.css">
	<meta name="viewport" content="initial-scale=1, maximum-scale=1.4">
	<meta name="generator" content="appledoc 2.2.1 (build 1334)">
</head>
<body class="appledoc">
	<header>
		<div class="container" class="hide-in-xcode">
			
			<h1 id="library-title">
				<a href="../index.html">KurentoToolbox </a>
			</h1>

			<p id="developer-home">
				<a href="../index.html">Nubomedia TI</a>
			</p>
			
		</div>
	</header>

	<aside>
		<div class="container">
			<nav>
				<ul id="header-buttons" role="toolbar">
					<li><a href="../index.html">Index</a></li>
<li><a href="../hierarchy.html">Hierarchy</a></li>

					<li id="on-this-page" role="navigation">
						<label>
							On This Page

							<div class="chevron">
								<div class="chevy chevron-left"></div>
								<div class="chevy chevron-right"></div>
							</div>

							<select id="jump-to">
	<option value="top">Jump To&#133;</option>
	
	<option value="overview">Overview</option>
	

	
	
	<option value="tasks">Tasks</option>
	
	

	
	
	<optgroup label="Properties">
		
		<option value="//api/name/configuration">configuration</option>
		
		<option value="//api/name/connected">connected</option>
		
		<option value="//api/name/connectionState">connectionState</option>
		
		<option value="//api/name/delegate">delegate</option>
		
		<option value="//api/name/url">url</option>
		
	</optgroup>
	

	

	
	<optgroup label="Instance Methods">
		
		<option value="//api/name/cancelAllRequest">- cancelAllRequest</option>
		
		<option value="//api/name/cancelRequest:">- cancelRequest:</option>
		
		<option value="//api/name/connect">- connect</option>
		
		<option value="//api/name/initWithURL:configuration:delegate:">- initWithURL:configuration:delegate:</option>
		
		<option value="//api/name/initWithURL:delegate:">- initWithURL:delegate:</option>
		
		<option value="//api/name/sendNotification:">- sendNotification:</option>
		
		<option value="//api/name/sendNotificationWithMethod:parameters:">- sendNotificationWithMethod:parameters:</option>
		
		<option value="//api/name/sendRequest:completion:">- sendRequest:completion:</option>
		
		<option value="//api/name/sendRequestWithMethod:completion:">- sendRequestWithMethod:completion:</option>
		
		<option value="//api/name/sendRequestWithMethod:parameters:completion:">- sendRequestWithMethod:parameters:completion:</option>
		
	</optgroup>
	
	
</select>
						</label>
					</li>
				</ul>
			</nav>
		</div>
	</aside>

	<article>
		<div id="overview_contents" class="container">
			<div id="content">
				<main role="main">
					<h1 class="title">NBMJSONRPCClient Class Reference</h1>

					
					<div class="section section-specification"><table cellspacing="0"><tbody>
						<tr>
	<th>Inherits from</th>
	<td>NSObject</td>
</tr><tr>
	<th>Declared in</th>
	<td>NBMJSONRPCClient.h</td>
</tr>
						</tbody></table></div>
					

                    
					
					<div class="section section-overview">
						<a title="Overview" name="overview"></a>
						<h2 class="subtitle subtitle-overview">Overview</h2>
						<p>NBMJSONRPCClient object communicates with web sockets using the JSON-RPC 2.0 protocol.</p>
					</div>
					
					

					
					
					<div class="section section-tasks">
						<a title="Tasks" name="tasks"></a>
						

						
						

						<div class="task-list">
							<div class="section-method">
	<a name="//api/name/url" title="url"></a>
	<h3 class="method-title"><code><a href="#//api/name/url">&nbsp;&nbsp;url</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>The URL for the websocket.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>@property (nonatomic) NSURL *url</code></div>

		    
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">NBMJSONRPCClient.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/configuration" title="configuration"></a>
	<h3 class="method-title"><code><a href="#//api/name/configuration">&nbsp;&nbsp;configuration</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>The client configuration object.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>@property (nonatomic, readonly) NBMJSONRPCClientConfiguration *configuration</code></div>

		    
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">NBMJSONRPCClient.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/delegate" title="delegate"></a>
	<h3 class="method-title"><code><a href="#//api/name/delegate">&nbsp;&nbsp;delegate</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>The delegate object for the client.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>@property (nonatomic, weak) id&lt;NBMJSONRPCClientDelegate&gt; delegate</code></div>

		    
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">NBMJSONRPCClient.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/connectionState" title="connectionState"></a>
	<h3 class="method-title"><code><a href="#//api/name/connectionState">&nbsp;&nbsp;connectionState</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			

			<div class="method-subsection method-declaration"><code>@property (nonatomic, readonly) NBMJSONRPCConnectionState connectionState</code></div>

		    
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/connected" title="connected"></a>
	<h3 class="method-title"><code><a href="#//api/name/connected">&nbsp;&nbsp;connected</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>A boolean that indicates the websocket connection status.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>@property (nonatomic, readonly, getter=isConnected) BOOL connected</code></div>

		    
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">NBMJSONRPCClient.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/initWithURL:delegate:" title="initWithURL:delegate:"></a>
	<h3 class="method-title"><code><a href="#//api/name/initWithURL:delegate:">&ndash;&nbsp;initWithURL:delegate:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>Creates and initializes a JSON-RPC client with the specified endpoint using default configuration.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (instancetype)initWithURL:(NSURL *)<em>url</em> delegate:(id&lt;NBMJSONRPCClientDelegate&gt;)<em>delegate</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>url</code></th>
						<td><p>The endpoint URL.</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>delegate</code></th>
						<td><p>The delegate object for the client.</p></td>
					</tr>
				
				</table>
			</div>
			

			
			<div class="method-subsection return">
				<h4 class="method-subtitle parameter-title">Return Value</h4>
				<p>An initialized JSON-RPC client.</p>
			</div>
			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">NBMJSONRPCClient.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/initWithURL:configuration:delegate:" title="initWithURL:configuration:delegate:"></a>
	<h3 class="method-title"><code><a href="#//api/name/initWithURL:configuration:delegate:">&ndash;&nbsp;initWithURL:configuration:delegate:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>Creates and initializes a JSON-RPC client with the specified endpoint using provided configuration.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (instancetype)initWithURL:(NSURL *)<em>url</em> configuration:(NBMJSONRPCClientConfiguration *)<em>configuration</em> delegate:(id&lt;NBMJSONRPCClientDelegate&gt;)<em>delegate</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>url</code></th>
						<td><p>The endpoint URL.</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>configuration</code></th>
						<td><p>A configuration object.</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>delegate</code></th>
						<td><p>The delegate object for the client.</p></td>
					</tr>
				
				</table>
			</div>
			

			
			<div class="method-subsection return">
				<h4 class="method-subtitle parameter-title">Return Value</h4>
				<p>An initialized JSON-RPC client.</p>
			</div>
			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">NBMJSONRPCClient.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/connect" title="connect"></a>
	<h3 class="method-title"><code><a href="#//api/name/connect">&ndash;&nbsp;connect</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>Connects client to the server using WebSocket.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)connect</code></div>

		    
			

			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<div class="note"><p><strong>Note:</strong> Use this method after initialization when <autoConnect> configuration&rsquo;s property is set to NO or when connection goes down and <a href="#//api/name/connected">connected</a> property switch to NO.</p></div>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">NBMJSONRPCClient.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/sendRequestWithMethod:completion:" title="sendRequestWithMethod:completion:"></a>
	<h3 class="method-title"><code><a href="#//api/name/sendRequestWithMethod:completion:">&ndash;&nbsp;sendRequestWithMethod:completion:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>Creates and sends a request with the specified method using websocket as transport channel.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (NBMRequest *)sendRequestWithMethod:(NSString *)<em>method</em> completion:(void ( ^ ) ( NBMResponse *response ))<em>responseBlock</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>method</code></th>
						<td><p>The request method. Must not be <code>nil</code>.</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>responseBlock</code></th>
						<td><p>A block object to be executed when the request is sent. This block has no return value and takes the response object created by the client
response serializer. The response object may be <code>nil</code> if network (e.g timeout) or parsing error occurred.</p></td>
					</tr>
				
				</table>
			</div>
			

			
			<div class="method-subsection return">
				<h4 class="method-subtitle parameter-title">Return Value</h4>
				<p>The <code>NBMRequest</code> object that was sent.</p>
			</div>
			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">NBMJSONRPCClient.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/sendRequestWithMethod:parameters:completion:" title="sendRequestWithMethod:parameters:completion:"></a>
	<h3 class="method-title"><code><a href="#//api/name/sendRequestWithMethod:parameters:completion:">&ndash;&nbsp;sendRequestWithMethod:parameters:completion:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>Creates and sends a request with the specified method and parameters using websocket as transport channel.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (NBMRequest *)sendRequestWithMethod:(NSString *)<em>method</em> parameters:(id)<em>parameters</em> completion:(void ( ^ ) ( NBMResponse *response ))<em>responseBlock</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>method</code></th>
						<td><p>The request method. Musto not be <code>nil</code>.</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>parameters</code></th>
						<td><p>The parameters to encode into the request. Must be either an <code>NSDictionary</code> or <code>NSArray</code>.</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>responseBlock</code></th>
						<td><p>A block object to be executed when the request is sent. This block has no return value and takes the response object created by the client.
response serializer. The response object may be <code>nil</code> if network (e.g timeout) or parsing error occurred.</p></td>
					</tr>
				
				</table>
			</div>
			

			
			<div class="method-subsection return">
				<h4 class="method-subtitle parameter-title">Return Value</h4>
				<p>The <code>NBMRequest</code> object that was sent.</p>
			</div>
			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">NBMJSONRPCClient.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/sendRequest:completion:" title="sendRequest:completion:"></a>
	<h3 class="method-title"><code><a href="#//api/name/sendRequest:completion:">&ndash;&nbsp;sendRequest:completion:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>Sends a provided request using websocket as transport channel.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)sendRequest:(NBMRequest *)<em>requestToSend</em> completion:(void ( ^ ) ( NBMResponse *response ))<em>responseBlock</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>requestToSend</code></th>
						<td><p>The <code>NBMRequest</code> object to send.</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>responseBlock</code></th>
						<td><p>A block object to be executed when the request is sent. This block has no return value and takes the response object created by the client
response serializer. The response object may be <code>nil</code> if network (e.g timeout) or parsing error occurred.</p></td>
					</tr>
				
				</table>
			</div>
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">NBMJSONRPCClient.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/sendNotificationWithMethod:parameters:" title="sendNotificationWithMethod:parameters:"></a>
	<h3 class="method-title"><code><a href="#//api/name/sendNotificationWithMethod:parameters:">&ndash;&nbsp;sendNotificationWithMethod:parameters:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>Creates and sends a notification with the specified method and parameters using websocket as transport channel.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (NBMRequest *)sendNotificationWithMethod:(NSString *)<em>method</em> parameters:(id)<em>parameters</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>method</code></th>
						<td><p>The notification method. Must not be <code>nil</code>.</p></td>
					</tr>
				
					<tr>
						<th scope="row" class="argument-name"><code>parameters</code></th>
						<td><p>The parameters to encode into the notification. Must be either an <code>NSDictionary</code> or <code>NSArray</code>, may be &lsquo;nil&rsquo;.</p></td>
					</tr>
				
				</table>
			</div>
			

			
			<div class="method-subsection return">
				<h4 class="method-subtitle parameter-title">Return Value</h4>
				<p>The <code>NBMRequest</code> object that was sent.</p>
			</div>
			

			

			
			<div class="method-subsection discussion-section">
				<h4 class="method-subtitle">Discussion</h4>
				<div class="note"><p><strong>Note:</strong> Notification is a <code>NBMRequest</code> object that produces no server response.</p></div>
			</div>
			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">NBMJSONRPCClient.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/sendNotification:" title="sendNotification:"></a>
	<h3 class="method-title"><code><a href="#//api/name/sendNotification:">&ndash;&nbsp;sendNotification:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>Sends a provided notification using websocket as transport channel.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)sendNotification:(NBMRequest *)<em>notification</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>notification</code></th>
						<td><p>The <code>NBMRequest</code> object to send.</p></td>
					</tr>
				
				</table>
			</div>
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">NBMJSONRPCClient.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/cancelRequest:" title="cancelRequest:"></a>
	<h3 class="method-title"><code><a href="#//api/name/cancelRequest:">&ndash;&nbsp;cancelRequest:</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>Allow to cancel a request and don&rsquo;t wait for a response.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)cancelRequest:(NBMRequest *)<em>request</em></code></div>

		    
			
			<div class="method-subsection arguments-section parameters">
				<h4 class="method-subtitle parameter-title">Parameters</h4>
				<table class="argument-def parameter-def">
				
					<tr>
						<th scope="row" class="argument-name"><code>request</code></th>
						<td><p>The <code>NBMRequest</code> object to cancel.</p></td>
					</tr>
				
				</table>
			</div>
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">NBMJSONRPCClient.h</code></p>
			</div>
			
			
		</div>
	</div>
</div><div class="section-method">
	<a name="//api/name/cancelAllRequest" title="cancelAllRequest"></a>
	<h3 class="method-title"><code><a href="#//api/name/cancelAllRequest">&ndash;&nbsp;cancelAllRequest</a></code>
</h3>

	<div class="method-info">
		<div class="pointy-thing"></div>

		<div class="method-info-container">
			
			
			<div class="method-subsection brief-description">
				<p>Allow to cancel all requests and don&rsquo;t wait for responses.</p>
			</div>
			
		    

			<div class="method-subsection method-declaration"><code>- (void)cancelAllRequest</code></div>

		    
			

			

			

			

			

			

			
			<div class="method-subsection declared-in-section">
				<h4 class="method-subtitle">Declared In</h4>
				<p><code class="declared-in-ref">NBMJSONRPCClient.h</code></p>
			</div>
			
			
		</div>
	</div>
</div>
						</div>
						
					</div>
					
					

                    
                    
          
				</main>

				<footer>
					<div class="footer-copyright">
						
						<p class="copyright">Copyright &copy; 2016 Nubomedia TI. All rights reserved. Updated: 2016-02-12</p>
						
						
						<p class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2.1 (build 1334)</a>.</p>
						
					</div>
				</footer>
			</div>
		</div>
	</article>

	<script src="../js/script.js"></script>
</body>
</html>